home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 #1 / Ham Radio 2000.iso / ham2000 / hf / dsp / source / init.lst < prev    next >
Encoding:
File List  |  1991-07-28  |  6.8 KB  |  190 lines

  1.  
  2. Motorola DSP56000 Macro Cross Assembler  Version 2.02  91-07-28  12:42:02  init.asm  Page 1
  3.  
  4.  
  5.  
  6. 1                                  page    132,63,1,1
  7. 2                                  opt     rc
  8. 4      
  9. 5                        ;***************************************************************
  10. 6                        ;* INIT.ASM -- DSP56001 interrupt vector table and DSP CARD 3  *
  11. 7                        ;*             initialization code                          *
  12. 8                        ;*                                                       *
  13. 9                        ;* Here are all DSP56001 interrupt vectors and space for       *
  14. 10                       ;* interrupt contexts. Also included are initalization code    *
  15. 11                       ;* and some stuff for debugging.                             *
  16. 12                       ;*                                                       *
  17. 13                       ;* Copyright (C) 1990, 1991 by Alef Null. All rights reserved. *
  18. 14                       ;* Author(s): Jarkko Vuori, OH2LNS                           *
  19. 15                       ;* Modification(s):                                        *
  20. 16                       ;***************************************************************
  21. 17     
  22. 225    
  23. 226                                section Vector
  24. 227                                xref    sci_rec,sci_xmt,sci_tim
  25. 228                                xref    m_rx,m_sr,m_tx,m_ssr,m_srxl
  26. 229    
  27. 263    
  28. 264                      ; Reset vector
  29. 265       P:0000                   org     p:i_reset
  30. 266       P:0000 0AF080            jmp     start
  31.                  000000
  32. 267    
  33. 268                      ; SSI receive interrupt
  34. 269       P:000C                   org     p:i_ssird
  35. 270       P:000C 085F6F            movep             x:m_rx,p:(r7)+
  36. 271       P:000D 000000            nop
  37. 272    
  38. 273                      ; SSI receive interrupt with errors
  39. 274       P:000E                   org     p:i_ssirde
  40. 275       P:000E 08676E            movep             x:m_sr,p:(r7) ; clear ROE
  41. 276       P:000F 08676F            movep             x:m_rx,p:(r7)
  42. 277    
  43. 278                      ; SSI transmitter interrupt
  44. 279       P:0010                   org     p:i_ssitd
  45. 280       P:0010 08F4AF            movep             #0,x:m_tx
  46.                  000000
  47. 281    
  48. 282                      ; SSI transmitter interrupt with errors
  49. 283       P:0012                   org     p:i_ssitde
  50. 284       P:0012 0870AE            movep             x:m_sr,x:m_tx ; clear TUE
  51.                  00FFEF
  52. 285    
  53. 286                      ; SCI receive interrupt
  54. 287       P:0014                   org     p:i_scird
  55. 288       P:0014 0BF080            jsr     sci_rec
  56.                  000000
  57. 289    
  58. 290                      ; SCI receive interrupt with errors
  59. 291       P:0016                   org     p:i_scirde
  60. 292       P:0016 0870B1            movep             x:m_ssr,x:m_tx
  61.                  00FFEF
  62. 293    
  63.  
  64.  
  65. Motorola DSP56000 Macro Cross Assembler  Version 2.02  91-07-28  12:42:02  init.asm  Page 2
  66. DSP CARD 3 initialization
  67.  
  68.  
  69. 294                      ; SCI transmitter interrupt
  70. 295       P:0018                   org     p:i_scitd
  71. 296       P:0018 0BF080            jsr     sci_xmt
  72.                  000000
  73. 297    
  74. 298                                endsec
  75. 299    
  76. 300    
  77. 301                                section Init
  78. 302                                xdef    start
  79. 303                                xref    ssi_ini,sci_ini
  80. 304                                xref    fft_i
  81. 305                                xref    m_loop
  82. 306                                xref    m_bcr,m_pcc,m_pcddr,m_pcd,m_ipr
  83. 307    
  84. 534    
  85. 535       P:0000                   org     p:
  86. 536    
  87. 537    
  88. 538                      ;****************************
  89. 539                      ;*   Start of the program   *
  90. 540                      ;****************************
  91. 541                      ; no wait states on external memory
  92. 542       P:0000 08F4BE  start     movep             #$0000,x:m_bcr ; no wait states
  93.                  000000
  94. 543    
  95. 544                      ; initialize peripherals
  96. 545       P:0002 0D0000            jsr     <ssi_ini
  97. 546       P:0003 0D0000            jsr     <sci_ini
  98. 547    
  99. 548                      ; initialize port C
  100. 549       P:0004 08F4A1            movep             #$01eb,x:m_pcc ; TXD,RXD,SC0,SC2,SCK,SRD,STD
  101.                  0001EB
  102. 550       P:0006 08F4A3            movep             #$0014,x:m_pcddr ; SCLK,SC1 as output
  103.                  000014
  104. 551       P:0008 08F4A5            movep             #$0000,x:m_pcd
  105.                  000000
  106. 552    
  107. 553                      ; initialize status
  108. 554                                movi    0,x:<status
  109. 557    
  110. 558                      ; initialize modules (with external hardware)
  111. 559       P:000C 0D0000            jsr     <fft_i
  112. 560    
  113. 561                      ; start interrupts
  114. 562       P:000D 08F4BF            movep             #$b400,x:m_ipr ; SSI=IPL2,SCI=IPL1,HOST=IPL0
  115.                  00B400
  116. 563       P:000F 00FCB8            andi    #$fc,mr   ; unmask interrupts
  117. 564    
  118. 565                      ; and jump to the main modem module
  119. 566       P:0010 0C0000            jmp     <m_loop
  120. 567    
  121. 568                                endsec
  122. 569    
  123. 570    
  124. 571    
  125. 572                      ;****************************
  126.  
  127.  
  128. Motorola DSP56000 Macro Cross Assembler  Version 2.02  91-07-28  12:42:02  init.asm  Page 3
  129. DSP CARD 3 initialization
  130.  
  131.  
  132. 573                      ;*   STATUS OF THE MODEM    *
  133. 574                      ;****************************
  134. 575    
  135. 576                                section Status
  136. 577    
  137. 578                                xdef    status
  138. 579    
  139. 580       X:0000                   org     x:
  140. 581    
  141. 582       X:0000 000000  status    ds      1
  142. 583    
  143. 584                                endsec
  144. 585    
  145. 586    
  146. 587                      ;****************************
  147. 588                      ;*  CONTEX STORE FOR INTS   *
  148. 589                      ;****************************
  149. 590    
  150. 591                                section Contexts
  151. 592                                xdef    scix,scir,scit
  152. 593                                xdef    scixr,scirr,swir
  153. 594    
  154. 821    
  155. 822       L:0000                   org     l:
  156. 823    
  157. 824                      scix      roomab
  158. 826                      scir      roomab
  159. 828                      scit      roomab
  160. 830    
  161. 831       Y:0000                   org     y:
  162. 832    
  163. 833                      scixr     roomr
  164. 835                      scirr     roomr
  165. 837                      swir      roomr
  166. 839    
  167. 840                                endsec
  168. 841    
  169. 842                                end
  170. 0    Errors
  171. 0    Warnings
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.